package com.mbsu.core.persistency.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.mbsu.core.persistency.dao.GenericDAO;
import com.mbsu.core.persistency.dao.UserAccountDAO;
import com.mbsu.core.persistency.domain.UserAccount;


@Repository
public class UserAccountDAOImpl extends GenericDAO implements UserAccountDAO{

	@SuppressWarnings("unchecked")
	public List<UserAccount> listUserAccounts(UserAccount kullanici) {
		return (List<UserAccount>) getSession().createCriteria(UserAccount.class).list();
	}

	@Transactional
	public void save(UserAccount kullanici) {
		getSession().save(kullanici);
		
	}

	@Transactional
	public void delete(UserAccount kullanici) {
		getSession().delete(kullanici);
		
	}
}
